import React, {Component} from 'react';
import {
    StyleSheet,
    ScrollView,
    Text,
    View,
    ImageBackground,
} from 'react-native';
import {
    Button,
    Flex,
    WhiteSpace,
    WingBlank,
    List,
} from '@ant-design/react-native';

const Item = List.Item;
const Brief = Item.Brief;
export default class Advisory extends Component {
    constructor() {
        //调用基类的所有的初始化方法
        super();

        // 设置当前组件的属性
        this.state = {
            //列表
            arr: [
                {
                    name: '胡歌',
                    tel: '15896541236',
                    address: '重庆市合川区华帝街华帝王朝33号',
                },
                {
                    name: '胡歌',
                    tel: '15896541236',
                    address: '重庆市合川区华帝街华帝王朝33号',
                },
            ],
        };
    }

    render() {
        return (
            <ScrollView style={{flex: 1}}>
                <WhiteSpace size="xl" />
                {this.state.arr.map((item) => {
                    return (
                        <>
                            <WingBlank style={styles.wingBlank}>
                                <Flex justify="between">
                                    <Text>姓名：{item.name}</Text>
                                    <Text>电话：{item.tel}</Text>
                                </Flex>
                                <Flex justify="start">
                                    <Text>地址：{item.address}</Text>
                                </Flex>
                            </WingBlank>
                        </>
                    );
                })}
            </ScrollView>
        );
    }
}
const styles = StyleSheet.create({
    wingBlank: {
        marginTop: 10,
        paddingBottom: 10,
        borderWidth: 0.3,
        paddingLeft: '1%',
        paddingRight: '1%',
    },
});
